home *** CD-ROM | disk | FTP | other *** search
- Path: isonews.bbn.hp.com!hpbblb!news
- From: Matthias Dittrich <matti>
- Newsgroups: comp.lang.c++
- Subject: Re: Need help making C program, C++
- Date: 11 Mar 1996 12:25:39 GMT
- Organization: Hewlett-Packard Co.
- Message-ID: <4i1643$ba5@hpbblb.bbn.hp.com>
- References: <313E7AE3.6F9C@cp.duluth.mn.us>
- NNTP-Posting-Host: trabant.bbn.hp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.07 9000/712)
- X-URL: news:313E7AE3.6F9C@cp.duluth.mn.us
-
- Yan Saillard <kannun@cp.duluth.mn.us> wrote:
- >............
- >*Warning CALK.CPP 19: Style of function definition is now obsolete
- >int doOp(o,r) char o; int r;
-
- Change this to:
- int doOp(char o,int r)
-
- >
- >*Warning CALK.CPP 30: Style of function definition is now obsolete:
- >void showResult(r) int r;
- >
- >What would be the way C++ defines functions?
- >
- >*Error CALK.CPP 39: Function 'getchar' should have a prototype
- >while((op = getchar()) != 'q')
- >..............
- If you ony want to compile this program with a c++ compiler, use ANSI function
- prototypes and include the correct header files. I don't know where getchar is
- located (you are using MS-DOS, I'm working with an operating system :-), but
- it should be stdio.h.
- But if you want to write a c++ program, you have to redesing it complete.
-
- Good luck,
- Matthias
-
-